package com.sj.purchase.modules.cost.repository;

import com.sj.purchase.modules.purchase.domain.PurchaseId;
import com.sj.purchase.modules.cost.domain.StockContrast;
import org.springframework.data.domain.Page;
import org.springframework.data.domain.Pageable;
import org.springframework.data.repository.CrudRepository;

import java.util.Date;
import java.util.List;

/**
 * Created by Alin on 2017/10/25.
 */
public interface StockContrastRepository  extends CrudRepository<StockContrast,PurchaseId> {

       Page<StockContrast> findById_SkuNoAndId_CreateDateBetween(String sku,Date start, Date end, Pageable pageable);
       Page<StockContrast> findById_SkuNo(String sku, Pageable pageable);
       Page<StockContrast> findById_CreateDateBetween(Date start, Date end, Pageable pageable);

       List<StockContrast> findById_SkuNoAndId_CreateDateBetween(String sku,Date start, Date end);
       List<StockContrast> findById_SkuNo(String sku);
       List<StockContrast> findById_CreateDateBetween(Date start, Date end);
}
